const state = {
  newOrder: null
}

const mutations = {
  SET_ORDER(state, order) {
    state.newOrder = order
  },
  CLEAR_ORDER(state) {
    state.newOrder = null
  }
}

const actions = {
  setOrder({ commit }, order) {
    commit('SET_ORDER', order)
  },
  clearOrder({ commit }) {
    commit('CLEAR_ORDER')
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
